﻿using System;
using System.Web.UI;
using Microsoft.SharePoint;
using Microsoft.SharePoint.WebControls;

namespace Sukul.SharePoint.Taxomatic
{
    public partial class Taxomatic : LayoutsPageBase
    {
        protected void Page_Load(object sender, EventArgs e)
        {
        }

        protected override void CreateChildControls()
        {
            //ScriptManager scriptManager1 = ScriptManager.GetCurrent(this.Page);
            //if (scriptManager1 == null)
            //{
            //    scriptManager1 = new ScriptManager() { ID = "ScriptManager1" };
            //    Page.Form.Controls.AddAt(0, scriptManager1);
            //}
            //scriptManager1.Services.Add(new ServiceReference("/_vti_bin/Sukul.SharePoint.Taxomatic/TaxomaticService.svc"));
            base.CreateChildControls();
        }

        protected override void OnInit(EventArgs e)
        {
            //Page.Init += delegate(object sender, EventArgs e_Init)
            //{
            //    if (ScriptManager.GetCurrent(Page) == null)
            //    {
            //        ScriptManager sMgr = new ScriptManager();
            //        Page.Form.Controls.AddAt(0, sMgr);
            //        sMgr.Services.Add(new ServiceReference("/_vti_bin/Sukul.SharePoint.Taxomatic/TaxomaticService.svc"));
            //    }
            //};
            base.OnInit(e);
        }
    }
}
